package cn.bytest.netty.serialize;

import cn.bytets.rpc.api.serialize.*;

import java.io.InputStream;
import java.io.OutputStream;

public class GsonSerialize implements RpcSerialize {

    @Override
    public String getContentType() {
        return "text/json";
    }

    @Override
    public ObjectOutput serialize(OutputStream output) {
        return new GsonOutput(output);
    }

    @Override
    public ObjectInput deserialize(InputStream input) {
        return new GsonInput(input);
    }
}
